package com.doit.学;

import java.io.*;
import java.util.*;

public class demo05 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("d:\\work\\abc\\3.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("d:\\work\\abc\\4.txt"));
        Map<String, String> map = new TreeMap<>();
        String line = null;
        while ((line = br.readLine())!=null){
            String[] split = line.split("\\.");
            map.put(split[0],split[1]);
        }
        br.close();
        Set<String> set = map.keySet();
        for (String s : set) {
            bw.write(s+"."+map.get(s));
            bw.newLine();
        }
        bw.close();

    }
}
